Giter Site home page Giter Site logo

weidows-projects / live2dloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from litstronger/live2d-moc3

24.0 24.0 1.0 311 KB

易用且适用于所有模型的live2d-web库, 手把手教做人(

Home Page: https://weidows-projects.github.io/Live2dLoader/

HTML 16.30% JavaScript 83.70%
cubism2 cubism4 live2d moc3 pixijs

live2dloader's People

Contributors

litstronger avatar weidows avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

meosu lei-cau

live2dloader's Issues

关于JsDelivr

JsDelivr的缓存慢的话大概两三天才能刷新, 新提交的代码生效不是很快
23.2.9晚还没刷新到2.8的代码, 仍是有bug的缓存版本

关于动作Motion调用

let po = this.model.toModelPosition(new PIXI.Point(offsetX, offsetY)),
hitAreas;
if (Object.keys(this.model.internalModel.hitAreas).length == 0) {
hitAreas = this.hitTest(po.x, po.y);
if (hitAreas.includes("TouchHead")) {
this.model.internalModel.motionManager.startMotion(
"",
motionIndex[0]
);
} else if (hitAreas.includes("TouchSpecial")) {
this.model.internalModel.motionManager.startMotion(
"",
motionIndex[1]
);
} else if (hitAreas.includes("TouchBody")) {
this.model.internalModel.motionManager.startMotion(
"",
motionIndex[2]
);
} else {
this.model.internalModel.motionManager.startRandomMotion("");
}
} else {
hitAreas = this.model.internalModel.hitTest(po.x, po.y);
if (hitAreas.includes("head") || hitAreas.includes("Head")) {
this.model.expression();
this.model.motion("Tap");
} else if (hitAreas.includes("body") || hitAreas.includes("Body")) {
this.model.motion("tap_body");
this.model.motion("Tap");
} else this.model.motion("Tap");
}
console.log("Start motion: ", hitAreas.join(" / "));

这块的逻辑虽然并不乱, 但是不是很优雅灵活

feat: 鼠标穿透

当live2d模型面积太大时,会点击不到其后面的内容

要把 canvas 置顶的同时, 可以同时点击到 live2d 和 其后面

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.