flipsnap.js 源码阅读备份】的更多相关文章

这是官网:http://hokaccha.github.io/js-flipsnap/ 1.引入全局命名空间 类似jQuery插件写法   传入window, document,提高内部访问速度: ;(function(window, document, undefined){})(window, window.document)   2.定义全局变量 /* 新建div节点 */ var div = document.createElement('div'); /* 浏览器前缀 */ var p…
在Framework7,其特色的HTML框架,可以创建精美的iOS应用;  她有自己的 DOM7- 一个集成了大部分常用DOM操作的高性能库.你不需要学习任何新的东西,因为她的用法和大名鼎鼎的jQuery几乎是一样的,包括大部分常用的方法和jquery风格的链式调用.去查看了一下dom7.js的源码,发现非常适合学习: 源码如下: /*=========================== Dom7 Library ===========================*/ var Dom7 =…
Core::Ray 该类用来表示空间中的“射线”,主要用来进行碰撞检测. THREE.Ray = function ( origin, direction ) { this.origin = ( origin !== undefined ) ? origin : new THREE.Vector3(); this.direction = ( direction !== undefined ) ? direction : new THREE.Vector3(); }; Ray类的构造函数颇为简单,…
本次阅读是初次阅读源码,参考了以下几篇文章: https://github.com/hanzichi?language=javascript&page=5&tab=stars https://github.com/WilberTian/StudySourceCode-Underscore underscore地址:https://github.com/jashkenas/underscore 阮一峰资料: http://javascript.ruanyifeng.com/library/u…
;(function () { 'use strict'; //构造函数 function FastClick(layer, options) { var oldOnClick; options = options || {}; /** * Whether a click is currently being tracked. * * @type boolean */ this.trackingClick = false; /** * Timestamp for when click track…
/* Zepto v1.0-1-ga3cab6c - polyfill zepto detect event ajax form fx - zeptojs.com/license */ ;(function(undefined) { if (String.prototype.trim === undefined) // fix for iOS 3.2 String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''…
/*! ** Unobtrusive Ajax support library for jQuery ** Copyright (C) Microsoft Corporation. All rights reserved. */ /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true,…
(function() { // Baseline setup // -------------- // Establish the root object, `window` in the browser, or `exports` on the server. var root = this;this._={};_.a=function(){}return _; }.call(this)); 杨龙飞 杨龙飞 杨龙飞 杨龙飞 杨龙飞 杨龙飞…
// 整个underscore的实现包在一个立即执行函数中,避免污染全局对象 // 通过call(this)来入全局变量 (function() { // 缓存this var root = this; // 保存原始的"_"变量 var previousUnderscore = root._; // Array,Object,Function这些都是函数,通过局部变量保存原型属性prototype也是为了方便压缩 var ArrayProto = Array.prototype, O…
最近看完了 backbone.js 的源码,这里对于源码的细节就不再赘述了,大家可以 star 我的源码阅读项目(https://github.com/JiayiLi/source-code-study)进行参考交流,有详细的源码注释,以及知识总结,同时 google 一下 backbone 源码,也有很多优秀的文章可以用来学习. 我这里主要记录一些偏设计方向的知识点.具体从以下几个方面入手:1.MVC 框架2.观察者模式 以及 控制反转 一.MVC 框架所谓 MVC 框架,包含三个部分,mod…