mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
fix undefined property
This commit is contained in:
@@ -39,7 +39,7 @@ export interface IGeometryOptions {
|
||||
}
|
||||
|
||||
export function normalizeGeometryOptions (options: IGeometryOptions) {
|
||||
options.wireframed = options.wireframed || false;
|
||||
options.wireframed = options.wireframed !== undefined? options.wireframed : false;
|
||||
options.windingOrder = options.windingOrder === undefined ?
|
||||
WindingOrder.CounterClockwise : options.windingOrder;
|
||||
options.includeNormal = options.includeNormal === undefined ?
|
||||
|
||||
@@ -85,7 +85,7 @@ export class TestModelStage extends RenderStage {
|
||||
this._scene._scene = this._scene;
|
||||
const modelCom = this._scene.addComponent('cc.ModelComponent');
|
||||
modelCom.material = this._material;
|
||||
modelCom.mesh = cc.utils.createMesh(cc.game._renderContext, cc.primitives.box());
|
||||
modelCom.mesh = cc.utils.createMesh(cc.game._renderContext, cc.primitives.box({length: 1, width: 1, height: 1}));
|
||||
this._model = modelCom._models[0];
|
||||
this._scene.setRotationFromEuler(45, 45, 45);
|
||||
this._scene._rot = this._scene._lrot;
|
||||
|
||||
Reference in New Issue
Block a user