Skip to content

Commit

Permalink
Merge branch '3d' of https://github.com/cocos-creator/engine into 3d
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrywwl committed Feb 25, 2019
2 parents fb126fc + f1c0c60 commit 47c5fd0
Show file tree
Hide file tree
Showing 40 changed files with 1,382 additions and 1,334 deletions.
4 changes: 2 additions & 2 deletions cocos/3d/assets/bitmap-font.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Font from "./font";
import vec2 from "../../core/vmath/vec2";
import { Texture2D } from "../../assets/texture-2d";

@ccclass('cc.BitmapFont')
// @ccclass('cc.BitmapFont')
export class BitmapFont extends Font {
/**
* @type {Texture2D}
Expand Down Expand Up @@ -82,4 +82,4 @@ export class BitmapFont extends Font {
}
}

cc.BitmapFont = BitmapFont;
// cc.BitmapFont = BitmapFont;
4 changes: 2 additions & 2 deletions cocos/3d/assets/font.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { _decorator } from "../../core/data/index";
const {ccclass} = _decorator;
import { Asset } from "../../assets/asset";

@ccclass('cc.Font')
// @ccclass('cc.Font')
export default class Font extends Asset {
/** Font size.
* @type {number}
Expand Down Expand Up @@ -78,4 +78,4 @@ export default class Font extends Asset {
}
}

cc.Font = Font;
// cc.Font = Font;
12 changes: 6 additions & 6 deletions cocos/3d/assets/physics/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export class PhysicsMaterial extends Asset {
* If non-negative, it will be used instead of the friction given by ContactMaterials.
* If there's no matching ContactMaterial, the value from .defaultContactMaterial in the World will be used.
*/
get friction() {
get friction () {
return this._friction;
}

set friction(value) {
set friction (value) {
this._friction = value;
this._cannonMaterial.friction = value;
}
Expand All @@ -34,21 +34,21 @@ export class PhysicsMaterial extends Asset {
* If non-negative, it will be used instead of the restitution given by ContactMaterials.
* If there's no matching ContactMaterial, the value from .defaultContactMaterial in the World will be used
*/
get restitution() {
get restitution () {
return this._restitution;
}

set restitution(value) {
set restitution (value) {
this._restitution = value;
this._cannonMaterial.restitution = value;
}

constructor() {
constructor () {
super();
this._cannonMaterial = new CANNON.Material('');
}

public _getImpl() {
public _getImpl () {
return this._cannonMaterial;
}
}
Expand Down
3 changes: 1 addition & 2 deletions cocos/3d/framework/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import AnimationComponent from './animation-component';
import { CameraComponent } from './camera-component';
import LightComponent from './light-component';
import { ModelComponent } from './model-component';
import { BoxColliderComponent, SphereColliderComponent, ColliderComponentBase } from './physics/collider-component';
import { BoxColliderComponent, SphereColliderComponent } from './physics/collider-component';
import { RigidBodyComponent } from './physics/rigid-body-component';
import SkinningModelComponent from './skinning-model-component';
import SkyboxComponent from './skybox-component';
Expand Down Expand Up @@ -56,7 +56,6 @@ cc.SkinningModelComponent = SkinningModelComponent;
cc.SkyboxComponent = SkyboxComponent;

cc.RigidBodyComponent = RigidBodyComponent;
cc.ColliderComponentBase = ColliderComponentBase;
cc.BoxColliderComponent = BoxColliderComponent;
cc.SphereColliderComponent = SphereColliderComponent;
cc.ParticleSystemComponent = ParticleSystemComponent;
Loading

0 comments on commit 47c5fd0

Please sign in to comment.