Skip to content

Instantly share code, notes, and snippets.

View huo-feng-ding's full-sized avatar
🌈
On vacation

火风鼎 huo-feng-ding

🌈
On vacation
View GitHub Profile
@huo-feng-ding
huo-feng-ding / artoolkit5源码编译.md
Last active February 20, 2019 02:15
artoolkit5源码编译build成min

下载 https://github.com/artoolkitx/jsartoolkit5 源码到本地(可以只下载源码,不需要使用git clone来下载,因为git下来的.git文件夹下的文件比较大,下载时间比较长)

下载 https://github.com/artoolkitx/artoolkit5 源码放到 jsartoolkit5/emscripten/artoolkit5 目录下边(也可以使用git submodule update --init命令来完成子模块的初始化,但是相应的.git文件夹太大,下载时间过长)

jsartoolkit5 https://github.com/artoolkit/jsartoolkit5 和 artoolkit5 https://github.com/artoolkit/artoolkit5 这两个地址的代码已长时间没有维护,之前在测试编译的过程中没有成功;最好使用上边的地址源码

使用Build using Docker来编译测试成功,而使用Build with manual emscripten setup没有成功,下边说说使用Build using Docker的编译过程

按照Build using Docker文档上步骤来执行即可,我使用的trzeci/emscripten-slim docker是最新版本的;在执行第三步的时候,有报编译异常

  • 找到emscripten/artoolkit5/include/AR/config.h.in 文件,复制一份重新命名成config.h
@huo-feng-ding
huo-feng-ding / README.md
Created March 28, 2019 11:39 — forked from biovisualize/README.md
d3.selection.appendHTML and appendSVG

Parse and append an HTML or SVG string. I use it a lot for appending a template, instead of generating it with d3.

d3.select('.container').appendHTML('<div><svg><g><rect width="50" height="50" /></g></svg></div>');

Unlike using .html, .appendHTML can append multiple elements

d3.select('.container').html('<span id="a"></span>');
d3.select('.container').html('<span id="b"></span>'); // will replace content
d3.select('.container').appendHTML('<span id="c"></span>'); // will append content
@huo-feng-ding
huo-feng-ding / swiper3-dropload.html
Created May 13, 2019 06:51
swiper 和 dropload 一起使用 实现导航和下拉刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Swiper demo</title>
<link rel="stylesheet" href="/static/js/src/front/forms/gather/mobile/hind/config/swiper/swiper.css"/>
<link rel="stylesheet" href="/static/js/lib/dropload/dropload.css"/>
<style>
html, body {