We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
官方阴影说明codepen示例中,灯光的castShadow打开,方块的castShadow关闭,地面的receiveShadow也关闭,阴影仍然存在。
通过以下步骤产生bug:
场景中会有一部分物体希望显示阴影 另一部分不想展示阴影。不想展示阴影的那些物体怎么设置?
0.6.9
import { Engine3D, Scene3D, Object3D, Camera3D, Vector3, AtmosphericComponent, View3D, LitMaterial, BoxGeometry, MeshRenderer, UnLitMaterial, SphereGeometry, DirectLight, PointLight, SpotLight, HoverCameraController, PlaneGeometry, Color } from '@orillusion/core' // shadow setting Engine3D.setting.shadow.autoUpdate = true Engine3D.setting.shadow.shadowBound = 100 Engine3D.setting.shadow.type = 'HARD' await Engine3D.init({ canvasConfig: { devicePixelRatio: 1 } }) let scene3D: Scene3D = new Scene3D() let cameraObj: Object3D = new Object3D() let camera = cameraObj.addComponent(Camera3D) camera.perspective(60, Engine3D.aspect, 1, 5000.0) let controller = cameraObj.addComponent(HoverCameraController) controller.setCamera(-45, -45, 100, new Vector3(0, 0, 0)) scene3D.addChild(cameraObj) //DirectLight { let obj = new Object3D() obj.rotationX = 45 obj.rotationY = 0 obj.rotationZ = 0 let light = obj.addComponent(DirectLight) scene3D.addChild(obj) // enable light shadow light.castShadow = true light.intensity = 30 scene3D.addChild(obj) } // create a box as shadow source { let castShadowObj = new Object3D() castShadowObj.y = 5 castShadowObj.rotationY = 45 let mr = castShadowObj.addComponent(MeshRenderer) mr.geometry = new BoxGeometry(10, 10, 10) mr.material = new LitMaterial() mr.material.baseColor = new Color(1, 0, 0) mr.castShadow = false scene3D.addChild(castShadowObj) } // create a plane to receive shadow { let receiveShadowObj = new Object3D() let mr = receiveShadowObj.addComponent(MeshRenderer) mr.geometry = new BoxGeometry(2000, 1, 2000) mr.material = new LitMaterial() mr.receiveShadow = false scene3D.addChild(receiveShadowObj) } // create a view with target scene and camera let view = new View3D() view.scene = scene3D view.camera = camera // start render Engine3D.startRenderView(view)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug描述
官方阴影说明codepen示例中,灯光的castShadow打开,方块的castShadow关闭,地面的receiveShadow也关闭,阴影仍然存在。
Bug复现流程
通过以下步骤产生bug:
期待的结果
场景中会有一部分物体希望显示阴影 另一部分不想展示阴影。不想展示阴影的那些物体怎么设置?
测试引擎版本:
0.6.9
代码示例
The text was updated successfully, but these errors were encountered: